<div class='fui-page  fui-page-current'>
    <div class='fui-content'>
		<div id="carousel-container" class="carousel slide" data-role="carousel" data-param-auto="true" ng-if="pagedata.pluginset.hdps">
			<div class="carousel-inner" role="listbox">
				<div ng-repeat="nav in pagedata.pluginset.hdps" ng-class="{'item':1, 'active':$index==0}" >
					<a ng-click="access_json(nav.url)">
						<img ng-src="{{tomedia(nav.picurl) || '../core/resource/images/nopic.jpg'}}" style="display: block; width: 100%; height: 100%;">
					</a>
				</div>
			</div>
			<style>
					.fui-swipe-page .fui-swipe-bullet {width:0.2rem;height:0.2rem;border-radius: 0.2rem;}
					.fui-swipe-page .fui-swipe-bullet.active {opacity: 1;width:0.6rem;border-radius: 0.2rem;}
			</style>
			<div id="carousel-jinyun" class="fui-swipe-page" style="padding: 0 0.2rem; bottom: 0.2rem; ">
				<div class="fui-swipe-bullet" ng-repeat="nav in pagedata.pluginset.hdps" ng-class="{'active':$index==0}" data-target="#carousel-container" data-slide-to="{{$index}}"></div>
			</div>
		</div>
		<script>
			require(['bootstrap', 'hammer'], function($, Hammer){
				$('#carousel-container').carousel();
				var mc = new Hammer($('#carousel-container').get(0));
				mc.on("panleft", function(ev) {
					$('#carousel-container').carousel('next');
				});
				mc.on("panright", function(ev) {
					$('#carousel-container').carousel('prev');
				});
			});
		</script>
	<div style="padding:0.5rem">
        <div class='fui-list-group' style="margin-top:0">
            <div class='fui-list'>
               <div class='fui-list-media'><img ng-src="{{tomedia(pagedata.member.avatar) || '../core/resource/images/nopic.jpg'}}"/></div>
                <div class='fui-list-inner'>
                    <div class='title'>{{pagedata.member.nickname}}</div>
                    <div class='gray'>{{pagedata.member.mobile}}</div>
                </div>
            </div>
        </div>
        <div class='fui-cell-group'>
            <div class='fui-cell-title bold'>请输入卡片码</div>
            <div class='fui-cell' style="padding-top:0">
                <div class='fui-cell-info'>
                    <input type='text' class='fui-input' id='code' ng-model="pagedata.code" placeholder='请输入卡片码'/>
                </div>
                <div class='fui-cell-remark noremark' style="width:3rem">
                    <div ng-click="access_json('/item//code='+pagedata.code)" class='btn btn-danger btn-sm btn-search'>去兑奖</div>
                </div>
            </div>
        </div>
		<div class="fui-list jump text-center">
			<div ng-click="pagedata.scancode()" style="width:100%">
					 <div><i class="icon jinyunicon icon-saoyisao1" style="font-size:3rem;color:#63BE72"></i></div>
					 <div class="subtitle" style="color: #63BE72;font-size:0.8rem">或点击扫码，扫卡片二维码！</div>
			</div>
		</div>
		<div class="weui_btn_area">
			  <a class="weui_btn weui_btn_primary" style="border-radius:1rem" href="javascript:" ng-click="access_json('jy_yxkabao/orderlist/')">查看兑奖记录</a>
		</div>
    </div>
	</div>
</div>
<script language="javascript">
scope.pagedata.scancode=function () {
			console.log('scanQRCodeOK');
			wx.scanQRCode({
				needResult: 1, // 默认为0，扫描结果由微信处理，1则直接返回扫描结果，
				scanType: ["qrCode","barCode"], // 可以指定扫二维码还是一维码，默认二者都有
				success: function (res) {
					var result = res.resultStr; // 当needResult 为 1 时，扫码返回的结果
					location.href = result;
				}
			});
}
</script> 